<?php

namespace globalunit\logic;

use globalunit\utils\CoroutineCurl;
use globalunit\utils\GenID;
use QYS\Db\Mysql;
use QYS\Db\Mongo;
use QYS\Db\Redis;
use QYS\Log\Log;
use QYS\Core\Config;
use globalunit\utils\KeysUtil;
use globalunit\model\Web3DModel;

class Web3DLogic
{

    public static function getWeb3D($appid)
    {
        $model = new Web3DModel();
        $ok = $model->get("appid = '{$appid}'");
        if (!$ok) {
            return null;
        }
        return $model->toarray();
    }

    public static function getWeb3dByAppid($appid)
    {
        $model = new Web3DModel();
        $ok = $model->get("appid = '{$appid}'");
        if (!$ok) {
            return null;
        }
        return $model->toarray();
    }

    public static function getWeb3dById($id)
    {
        $model = new Web3DModel();
        $ok = $model->get("id = {$id}");
        if (!$ok) {
            return null;
        }
        return $model->toarray();
    }
}
